<template>
	<view>
		<dsl-navbar title="钻石明细" bgTopImg="white" isBack></dsl-navbar>

		<view >
			<view class="rowsb padding" style="color: #9AA2B5;">
				<view class="align-center">
					<picker mode="date" :value="startTime" start="2015-09-01" end="2090-09-01" @change="DateChange" class="margin-right-sm">
						<view class="picker align-center">
							{{startTime ||'请选择开始日期'}}
							<image src="/static/icon/imgrili.png" mode="widthFix" style="width: 40rpx;" class="margin-left-sm"></image>
						</view>
					</picker>
				</view>
				<view class="align-center">
					<picker mode="date" :value="endTime" start="2015-09-01" end="2090-09-01" @change="DateChange1" class="margin-right-sm">
						<view class="picker align-center">
							{{endTime ||'请选择结束日期'}}
							<image src="/static/icon/imgrili.png" mode="widthFix" style="width: 40rpx;" class="margin-left-sm"></image>
						</view>
					</picker>
				</view>
			</view>
			<view class="align-center padding bg-white solid-bottom rowsb" v-for="(item,index) in payMessageList" :key="index"
			hover-class="bg-gray"
			>
				<view>{{item.remark}}</view>
				<view class="active_title">
				<text v-if="item.optType==0">+</text>
				<text v-if="item.optType==1">-</text>
				{{item.amount}}</view>
			</view>
		</view>
	<!-- 	<view >
			<view style="color: #9AA2B5;" class="padding">
				邀请总人数：3人
			</view>
			<view class="align-center bg-white padding solid-bottom " v-for="(item,index) in 3">
				<image src="" mode="" class="user_image"></image>
				<view class="margin-left">
					我的名称
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	import {
		mapState,
		mapActions
	} from 'vuex'
	export default {
		data() {
			return {
				num: 0,
				pageNum: 1, //第一页
				startTime:'',//时间
				endTime:'',//结束时间

			}
		},
		//生命周期函数
		onReady() {},
		onLoad() {},
		onShow() {
			this.getaccountLog({
				pageNum: 1,
				pageSize:30,
				type:1,//类型 0-余额 1-钻石
			})
		},
		methods: {
			//选择日期
			DateChange(e){
				this.startTime = e.detail.value
				this.getaccountLog({
					pageNum: 1,
					pageSize:30,
					type:1,//类型 0-余额 1-钻石
					startTime:this.startTime,//开始时间
					endTime:this.endTime,//截至时间
				})
			},
			DateChange1(e){
				this.endTime = e.detail.value
				this.getaccountLog({
					pageNum: 1,
					pageSize:30,
					type:1,//类型 0-余额 1-钻石
					startTime:this.startTime,//开始时间
					endTime:this.endTime,//截至时间
				})
			},
			
			/**
			 * getaccountLog 钻石清单
			 */
			...mapActions('money', ['getaccountLog']),
			onReachBottom(e) {
				this.pageNum++
				this.getaccountLog({
					pageNum: this.pageNum,
					pageSize:30,
					type:1,//类型 0-余额 1-钻石
					startTime:this.startTime,//开始时间
					endTime:this.endTime,//截至时间
				})
			},
		},
		computed: {
			/**
			 * 钻石明细
			 */
			...mapState('money',['payMessageList'])
		},
		components: {}
	}
</script>

<style>
	.title {
		color: #515151;
	}

	.title_bottom {
		/* background-color: #515151; */
		height: 4rpx;
		margin-top: 20rpx;
	}



	page {
		background-color: #F7F6FA;
	}

	.user_image {
		width: 88rpx;
		height: 88rpx;
		background: #FF8F2E;
		border-radius: 50%;
	}

	.active_title {
		color: #EAA019 !important;
	}
</style>
